package org.redis.cluster.test.transport.netty;

import java.util.List;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;

public class NettyDecoder extends ByteToMessageDecoder {
	
	private final static byte START_BYTE='*';
	
	private final static byte LENGTH_START_BYTE='$';

	private final static byte LINE_END_BYTE_1='\r';
	
	private final static byte LINE_END_BYTE_2='\n';
	
	@Override
	protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
		System.out.println(in.readableBytes());
	}
}